# from fastapi import APIRouter
# from industry.models import *
# from common import ApiResult
#
# api = APIRouter()
#
# # =====================   producer   =======================
#
#
# @api.post("/producer/page", summary="生产厂商分页列表", description="生产厂商分页列表")
# async def get_producer_page(params: PageParams):
#     page = producer_page(params)
#     return ApiResult(data=page)
#
#
# @api.post("/producer", summary="生产厂商保存", description="生产厂商保存")
# async def save_producer(item: ProducerDto):
#     num = insert_producer(item)
#     return ApiResult(data=num)
#
#
# @api.put("/producer", summary="生产厂商更新", description="生产厂商更新")
# async def update_producer(item: ProducerDto):
#     num = update_producer(item)
#     return ApiResult(data=num)
#
#
# @api.delete("/producer/{id}", summary="生产厂商删除", description="生产厂商删除")
# async def delete_producer(id: int):
#     num = delete_producer(id)
#     return ApiResult(data=num)
#
#
# @api.get("/producer/{id}", summary="生产厂商详情", description="生产厂商详情")
# async def producer_info(id: int):
#     item = get_producer(id)
#     return ApiResult(data=item)
#
#
# # =====================   car   =======================
#
#
# @api.post("/car/page", summary="汽车分页列表", description="汽车分页列表")
# async def get_car_page(params: PageParams):
#     page = car_page(params)
#     return ApiResult(data=page)
#
#
# @api.post("/car", summary="汽车保存", description="汽车保存")
# async def save_car(item: CarDto):
#     num = insert_car(item)
#     return ApiResult(data=num)
#
#
# @api.put("/car", summary="汽车更新", description="汽车更新")
# async def update_car(item: CarDto):
#     num = update_car(item)
#     return ApiResult(data=num)
#
#
# @api.delete("/car/{id}", summary="汽车删除", description="汽车删除")
# async def delete_car(id: int):
#     num = delete_car(id)
#     return ApiResult(data=num)
#
#
# @api.get("/car/{id}", summary="汽车详情", description="汽车详情")
# async def car_info(id: int):
#     item = get_car(id)
#     return ApiResult(data=item)
